package com.littcore.saap.personal.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.littcore.dao.page.IPageList;
import com.littcore.dao.ql.PageParam;
import com.littcore.exception.NotLoginException;
import com.littcore.saap.personal.po.Todo;

/**
 * 
 * Todo service interface.
 * <pre><b>Description：</b>
 *    todo list.
 * </pre>
 * 
 * @author <a href="mailto:littcai@hotmail.com">Bob.cai</a>
 * @since 2013-09-12
 * @version 1.0
 */
public interface ITodoService
{ 

   	/**
	 * Save.
	 * @param todo Todo
	 * @return id
	 */
	public Integer save(Todo todo) ;
	
   	/**
	 * Update.
	 * @param todo Todo
	 */
	public void update(Todo todo) ;	
	
	/**
	 * Update status.
	 *
	 * @param id the id
	 * @param status the status
	 * @ the not login exception
	 */
	public void updateStatus(int id, int status) ;
	
	/**
   * 更新公开标志.
   *
   * @param id the id
   * @param isPublic the is public
   */
  public void updatePublic(int id, boolean isPublic);
   
   	/**
	 * Delete by id.
	 * @param id id
	 */
	public void delete(Integer id);	
	
	/**
	 * Load by id.
	 * @param id id
	 * @return Todo
	 */
	public Todo load(Integer id);	
	
	/**
	 * list by page.
	 * 
	 * @param pageParam params
	 * @return IPageList IPageList
	 */
	public IPageList listPage(PageParam pageParam);	
	
	/**
   * 根据租户中所有用户查询这些用户公开的TODO.
   *
   * @param tenantId 租户ID
   * @param startDate 开始时间
   * @param endDate 结束时间
   * @return the list
   */
  public List<Map<String, Object>> listPublic(int tenantId, Date startDate, Date endDate);

}